<template>
  <div class="tabs">
    <el-tabs type="border-card" @tab-change="tabsFn">
      <el-tab-pane label="门店列表">
        <storeList ref="storeListRef"></storeList>
      </el-tab-pane>
      <el-tab-pane label="库存管理">
        <Inventory ref="InventoryRef"></Inventory>
      </el-tab-pane>
      <el-tab-pane label="门店审核">
        <Audio ref="AudioRef"></Audio>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script setup>
import storeList from './components/storeList.vue'
import Audio from './components/audit.vue'
import Inventory from './components/inventory.vue'
import { ref } from 'vue'
let storeListRef = ref(null)
let AudioRef = ref(null)
let InventoryRef = ref(null)
const tabsFn = (number) => {
  if (number == 0) {
    storeListRef.value.getData()
  } else if (number == 1) {
    InventoryRef.value.getData()
  } else {
    AudioRef.value.getData()
  }

}
</script>

<style lang="scss" scoped>
.tabs {
  width: 100%;
}
</style>